import time

from selenium import webdriver
from selenium.webdriver.common import keys
from selenium.webdriver.common.by import By

# driver = webdriver.Chrome()
# driver.get('https://www.baidu.com')
# time.sleep(2)
# kw = driver.find_element(By.ID, 'kw')
# kw.send_keys('天气预报')
# time.sleep(2)
# kw.send_keys(keys.Keys.CONTROL, 'a')
# time.sleep(2)
# kw.send_keys(keys.Keys.CONTROL, 'c')
# driver.get('https://www.so.com')
# ipt =driver.find_element(By.ID, 'input')
# ipt.send_keys(keys.Keys.CONTROL, 'v')
# driver.find_element(By.ID, 'search-button').click()
# driver.quit()
#
driver = webdriver.Chrome()
driver.get("https://www.baidu.com")
kw = driver.find_element(By.ID, 'kw')
kw.send_keys("天气预报")
time.sleep(2)
kw.send_keys(keys.Keys.CONTROL, 'a')
time.sleep(2)

